#include "TaskQueue.hpp"
#include "ProducerThread.hpp"
#include "ConsumerThread.hpp"

#include <iostream>
#include <memory>

using std::cout;
using std::endl;
using std::unique_ptr;

int main()
{

    wd::TaskQueue que(10);
    unique_ptr<wd::Thread> pProducer(new wd::ProducerThread(que));
    unique_ptr<wd::Thread> pConsumer(new wd::ConsumerThread(que));

    pProducer->start();//运行生产者线程
    pConsumer->start();//运行消费者线程

    pProducer->join();
    pConsumer->join();
    return 0;
}

